# Make sure @INSTALL_CMAKE_NAMESPACE@ is found before anything else.
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND FALSE)

if("${_qext_cmake_dir}" STREQUAL "")
    set(_qext_cmake_dir "${QEXT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}")
endif()
set(__qext_use_no_default_path_for_qext_packages "NO_DEFAULT_PATH")
if(QEXT_DISABLE_NO_DEFAULT_PATH_IN_QEXT_PACKAGES)
    set(__qext_use_no_default_path_for_qext_packages "")
endif()

# Don't propagate REQUIRED so we don't immediately FATAL_ERROR, rather let the find_dependency calls
# set _NOT_FOUND_MESSAGE which will be displayed by the includer of the Dependencies file.
set(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED FALSE)

if(NOT @INSTALL_CMAKE_NAMESPACE@_FOUND)
    find_dependency(@INSTALL_CMAKE_NAMESPACE@ @main_qext_package_version@
        PATHS
            "${CMAKE_CURRENT_LIST_DIR}/.."
            "${_qext_cmake_dir}"
            ${_qext_additional_packages_prefix_paths}
            ${QEXT_EXAMPLES_CMAKE_PREFIX_PATH}
        ${__qext_use_no_default_path_for_qext_packages}
    )
endif()


# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
set(__qext_@target@_third_party_deps "@third_party_deps@")
_qext_internal_find_third_party_dependencies("@target@" __qext_@target@_third_party_deps)

# Find QExt tool package.
set(__qext_@target@_tool_deps "@main_module_tool_deps@")
_qext_internal_find_tool_dependencies("@target@" __qext_@target@_tool_deps)

# note: target_deps example: "QEXT1Core\;1.1.0;QEXT1Osgi\;1.1.0"
set(__qext_@target@_target_deps "@target_deps@")
set(__qext_@target@_find_dependency_paths "${CMAKE_CURRENT_LIST_DIR}/.." "${_qext_cmake_dir}")
_qext_internal_find_qext_dependencies("@target@" __qext_@target@_target_deps
                                  __qext_@target@_find_dependency_paths)

set(_@QEXT_CMAKE_EXPORT_NAMESPACE@@target@_MODULE_DEPENDENCIES "@qext_module_dependencies@")
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)
